Obfuscation safe reflection

Q: How to ensure that code can be obfuscated, but reflection API benefits for action invoking could be used? A: In JDK 5.0 solution exists, just use annotations. So how to do such. 1) Define appropriate annotation [code lang=”java”] @Retention(RetentionPolicy.RUNTIME) @Target(ElementType.METHOD) public @interface Call { int value(); } [/code] 2) Define reflection action to use … Jatka artikkelin Obfuscation safe reflection lukemista